package contest.oop.sse.secalg;

public abstract class SymmetricAlgorithm {
    protected String key;

    /**
     * 对称算法加密
     *
     * @param original 明文字符串
     * @return 密文的字节数组
     */
    public abstract byte[] encrypt(String original);

    /**
     * 对称算法解密
     *
     * @param cipher 密文的字节数组
     * @return 明文字符串
     */
    public abstract String decrypt(byte[] cipher);

    public void setKey(String key) {
        this.key = key;
    }
}
